package session.entity;

import java.util.Collection;
import java.util.HashMap;

public class CakeDB {
    private  static HashMap<String,Cake> cakeDB = new HashMap<String,Cake>();
    static {
        cakeDB.put("1",new Cake("1","陈煜的A类蛋糕"));
        cakeDB.put("2",new Cake("2","陈煜的B类蛋糕"));
        cakeDB.put("3",new Cake("3","陈煜的C类蛋糕"));
        cakeDB.put("4",new Cake("4","陈煜的D类蛋糕"));
        cakeDB.put("5",new Cake("5","陈煜的E类蛋糕"));
    }
    // getAll
    public static Collection<Cake> getAll(){
        return cakeDB.values();
    }
    // getCakeById
    public static Cake getCakeById(String id){
        return cakeDB.get(id);
    }
}
